<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return CMap::mergeArray(
	require_once(dirname(__FILE__).'/siteconfig.php'),
	array(
		'defaultController'=>'site',
		'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
		'name'=>'VCHECHNE.ru',
		
		// используемые приложением поведения
		'behaviors'=>array(
			'runEnd'=>array(
					'class'=>'application.behaviors.WebApplicationEndBehavior',
			),
		),
		'sourceLanguage'=>'ru_ru',
		'language'=>'ru',
		'charset'=>'utf-8',
		// preloading 'log' component
		'preload'=>array('log'),
	
		// autoloading model and component classes
		'import'=>array(
			'application.models.*',
			'application.components.*',
			'application.helpers.*',
		),
	
		'modules'=>array(
			// uncomment the following to enable the Gii tool
			
			'gii'=>array(
				'class'=>'system.gii.GiiModule',
				'password'=>'password',
				// If removed, Gii defaults to localhost only. Edit carefully to taste.
				'ipFilters'=>array('127.0.0.1','::80'),
			),
		    'email' => array(
		    	// нормальна робота
		         //'delivery' => 'php',
		        // для локального сервера
		       'delivery' => 'debug',
		    )
		),
		
		// application components
		'components'=>array(
			'ePdf' => array(
				'class'         => 'ext.yii-pdf.EYiiPdf',
				'params'        => array(
					'HTML2PDF' => array(
							'librarySourcePath' => 'application.vendors.html2pdf.*',
							'classFile'         => 'html2pdf.class.php', // For adding to Yii::$classMap
					)
				),
			),
			'html2doc' => array(
				'class' => 'ext.html2doc.htmlToDoc',
			),
			'user'=>array(
				// enable cookie-based authentication
				'class' => 'WebUser',
				'allowAutoLogin'=>true,
			),
			'authManager' => array(
				// Будем использовать свой менеджер авторизации
				'class' => 'PhpAuthManager',
				// Роль по умолчанию. Все, кто не админы, модераторы и юзеры — гости.
				'defaultRoles' => array('guest'),
			),
			// uncomment the following to enable URLs in path-format
			'breadCrumbs'=>array(
		        'class'=>'EBreadCrumbsComponent',
		        // {@link CBreadcrumbs} widget options.
		        'widget'=>array(
		            'separator'=>' &rsaquo; ',
		        ),
		    ),
			'db'=>array(
				'connectionString' => 'mysql:host=localhost;dbname=vchechne',
				'emulatePrepare' => true,
				'username' => 'root',
				'password' => '',
				'charset' => 'utf8',
				'tablePrefix' => 'soc_',
				'enableProfiling'=>true,
	       		'enableParamLogging' => true,
			),
			
			'errorHandler'=>array(
				// use 'site/error' action to display errors
				'errorAction'=>'site/error',
			),
			'log'=>array(
				'class'=>'CLogRouter',
				'routes'=>array(
					array(
						'class'=>'CFileLogRoute',
						'levels'=>'error, warning',
					),
					// uncomment the following to show log messages on web pages
					/*
					array(
						'class'=>'CWebLogRoute',
					),
					*/
				),
			),
		),
	)
);